- Author:
- Weiwei Ai <wai484@aucklanduni.ac.nz>
- Date:
- 2024-05-27 16:40:34+12:00
- Desc:
- Fixed typos
- Permanent Source URI:
- https://models.fieldml.org/workspace/b65/rawfile/54428a600e2c560005a2d9d0a5608082f90a7c0c/Electrogenic cotransporter/CellMLV2/SGLT1_ss.py
# The content of this file was generated using the Python profile of libCellML 0.5.0.
from enum import Enum
from math import *
__version__ = "0.4.0"
LIBCELLML_VERSION = "0.5.0"
STATE_COUNT = 1
VARIABLE_COUNT = 54
class VariableType(Enum):
VARIABLE_OF_INTEGRATION = 0
STATE = 1
CONSTANT = 2
COMPUTED_CONSTANT = 3
ALGEBRAIC = 4
VOI_INFO = {"name": "t", "units": "second", "component": "params_BG", "type": VariableType.VARIABLE_OF_INTEGRATION}
STATE_INFO = [
{"name": "V0_Vm", "units": "volt", "component": "params_BG", "type": VariableType.STATE}
]
VARIABLE_INFO = [
{"name": "q_Nai", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Nai", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_i", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_Nao", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Nao", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_o", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_Glci", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Glci", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_Glco", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Glco", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "R", "units": "J_per_K_mol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "T", "units": "kelvin", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "F", "units": "C_per_mol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Nai", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Nao", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Glci", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Glco", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_1", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_1", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_2", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_2", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_3", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_3", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_4", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_4", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_5", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_5", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_6", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_6", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "z_zf1", "units": "dimensionless", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "z_zf6", "units": "dimensionless", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r1", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r2", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r3", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r4", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r5", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r6", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r7", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "Ii", "units": "fA", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v", "units": "fmol_per_s", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "z_1", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "z_2", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Ii_1", "units": "fA", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_1", "units": "fmol_per_s", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "sigma", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "q_tot", "units": "fmol", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "v_max", "units": "fmol_per_s", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Na_o", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Na_i", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Glc_o", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Glc_i", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "B", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "q_1", "units": "fmol", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC}
]
def create_states_array():
return [nan]*STATE_COUNT
def create_variables_array():
return [nan]*VARIABLE_COUNT
def initialise_variables(states, rates, variables):
variables[1] = 20.0
variables[2] = 8.5e5
variables[4] = 100.0
variables[5] = 8.5e5
variables[7] = 10.0e-3
variables[9] = 1.0e-12
variables[10] = 8.31
variables[11] = 293.0
variables[12] = 96485.0
variables[13] = 3.216e-08
variables[14] = 3.216e-08
variables[15] = 4.848e-06
variables[16] = 4.848e-06
variables[17] = 2.235
variables[18] = 16.605778811026234
variables[19] = 10.437
variables[20] = 16.605778811026234
variables[21] = 8.602
variables[22] = 16.605778811026234
variables[23] = 8.602
variables[24] = 16.605778811026234
variables[25] = 28.628
variables[26] = 16.605778811026234
variables[27] = 0.192
variables[28] = 16.605778811026234
variables[29] = 0.3
variables[30] = 0.7
variables[31] = 47.905
variables[32] = 2.325
variables[33] = 5.812
variables[34] = 92.998
variables[35] = 0.349
variables[36] = 15.661
variables[37] = 0.029
states[0] = -0.15
def compute_computed_constants(variables):
variables[0] = variables[1]*variables[2]
variables[3] = variables[4]*variables[5]
variables[6] = variables[7]*variables[2]
variables[8] = variables[9]*variables[5]
variables[40] = variables[29]
variables[41] = variables[30]
variables[45] = variables[18]+variables[20]+variables[22]+variables[24]+variables[26]+variables[28]
variables[46] = variables[45]*variables[36]*variables[17]
variables[47] = variables[14]*variables[3]
variables[48] = variables[13]*variables[0]
variables[49] = variables[16]*variables[8]
variables[50] = variables[15]*variables[6]
def compute_rates(voi, states, rates, variables):
rates[0] = 0.01/1.0
def compute_variables(voi, states, rates, variables):
variables[44] = variables[12]*states[0]/(variables[10]*variables[11])
variables[51] = (exp(2.0*variables[40]*variables[44])+pow(variables[47], 2.0)*(variables[17]/variables[19]+variables[17]/variables[21]*variables[49]))*(pow(variables[48], 2.0)*variables[50]*exp(variables[41]*variables[44])+variables[36]/variables[33])+(variables[17]/variables[27]+pow(variables[48], 2.0)*(variables[17]/variables[25]+variables[17]/variables[23]*variables[50]))*(pow(variables[47], 2.0)*variables[49]*exp(variables[41]*variables[44])+variables[36]/variables[33]*exp(2.0*variables[44]))
variables[39] = variables[46]*(pow(variables[47], 2.0)*variables[49]-pow(variables[48], 2.0)*variables[50]*exp(2.0*variables[44]))/variables[51]
variables[38] = 2.0*(variables[40]+variables[41])*variables[12]*variables[39]
variables[52] = (1.0+variables[17]/variables[19]*pow(variables[47], 2.0)*exp(-2.0*variables[40]*variables[44])+variables[17]/variables[21]*pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44]))*(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))+(variables[17]/variables[23]*variables[50]+variables[17]/variables[25]+variables[17]/variables[27]*pow(variables[48], -2.0))*(pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44])+variables[36]/variables[33]*exp(variables[41]*variables[44]))
variables[53] = variables[45]/variables[52]*(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))
variables[43] = variables[33]*variables[17]*(pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44])*(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))-variables[50]*(pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44])+variables[36]/variables[33]*exp(variables[41]*variables[44])))*variables[53]/(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))
variables[42] = 2.0*(variables[40]+variables[41])*variables[12]*variables[43]